-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camera fields may be undefined if it is still morphing #3868
Conversation
Thanks @lasalvavida! Can you add a unit test? |
@hpinkos Updated with test |
The test you wrote passes in master. That means it's not really testing the change you made. It should fail in master and pass on this branch. I think that's happening because |
Good catch @hpinkos; I updated the test |
Great, thanks @lasalvavida! Update |
Updated |
var oldPitch = options.camera.pitch; | ||
|
||
options.camera._mode = SceneMode.MORPHING; | ||
options.camera.heading = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, since this test can run asynchronously, I think we need to make a copy of options for this test instead. Otherwise there may be a race condition that causes other tests to intermittently fail.
@hpinkos This update should avoid that race condition. It also removes the need to explicitly set the properties to undefined since it is a real camera now whose fields will be undefined while in morphing mode. |
Everything looks good! Thanks @lasalvavida! |
Fix for #3865